package com.curator;

import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import com.curator.install.InstallLayout;
import com.curator.install.InstallService;
import com.curator.util.ConfigUtil;
import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.image.Image;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
import javafx.stage.DirectoryChooser;
import javafx.stage.Stage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @author Jun
 * @date 2024/12/4 
 */
public class MainApplication extends Application {

    private static final Logger logger = LoggerFactory.getLogger(MainApplication.class);

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) throws Exception {

        TabPane tabPane = new TabPane();

        // 安装
        Tab installTab = InstallLayout.initInstallTab(primaryStage);

        Tab serviceTab = new Tab("服务");

        tabPane.getTabs().addAll(installTab, serviceTab);

        Scene scene = new Scene(tabPane, 750, 450);
        scene.getStylesheets().add(getClass().getResource("/css/styles.css").toExternalForm());
        primaryStage.setScene(scene);
        primaryStage.setResizable(false);
        primaryStage.setTitle("庄馆长代码开发平台软件安装");
        primaryStage.getIcons().add(new Image("images/icon1.ico"));

        primaryStage.show();
    }


}
